package com.twf.a04test;

import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int n = sc.nextInt();
        long sum = 0;
        long wei = 0;
        for (int i = 0; i < n; i++) {
            wei = (long) (wei + 8 * Math.pow(10,i));
            sum += wei;
        }
        System.out.println(sum);
    }
}
